package com.gjs.freechat.server.dao.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.gjs.freechat.server.component.bean.ChatSession;
import com.gjs.freechat.server.component.bean.Conversation;
import com.gjs.freechat.server.component.bean.Message;

public interface ChatSessionMapper {
	public List<Conversation> getAllConvos(String userId);
	public void addNewConvo(Conversation newConvo);
	public void removeConvo(String sessionId, @Param("userId") String userId);
	public void removeSession(String sessionId);
	public void addNewSession(ChatSession chatSession);
	public List<ChatSession> getAllChatSessions();
	public void insertNewMessage(Message msg);
	public void updateConvo(@Param("convo") Conversation convo, String sessionId, String userId);
	public void addUnreadMessage(String sessionId, String userId);
	public void clearUnreadMessages(String sessionId, String userId);
	public void removeMessageByMsgType(Message msg);
	public void removeMessages(String sessionId);
	public void addFriendRequest(String sessionId, String senderId);
	public void rejectFriendRequest(String sessionId);
	public void acceptFriendRequest(String sessionId);
	public void updateFriendNickName(String convoId, String userId, String name);
}
